<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Oxygine: Json::CharReaderBuilder Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Oxygine
   &#160;<span id="projectnumber">1</span>
   </div>
   <div id="projectbrief">2g game engine</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespace_json.html">Json</a></li><li class="navelem"><a class="el" href="class_json_1_1_char_reader_builder.html">CharReaderBuilder</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="class_json_1_1_char_reader_builder-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Json::CharReaderBuilder Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Build a <a class="el" href="class_json_1_1_char_reader.html">CharReader</a> implementation.  
 <a href="class_json_1_1_char_reader_builder.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="json_8h_source.html">json.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Json::CharReaderBuilder:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_json_1_1_char_reader_builder.png" usemap="#Json::CharReaderBuilder_map" alt=""/>
  <map id="Json::CharReaderBuilder_map" name="Json::CharReaderBuilder_map">
<area href="class_json_1_1_char_reader_1_1_factory.html" alt="Json::CharReader::Factory" shape="rect" coords="0,0,164,24"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ab14c54e438007a57c1acbd6e7459d4d0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_json_1_1_char_reader.html">CharReader</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_json_1_1_char_reader_builder.html#ab14c54e438007a57c1acbd6e7459d4d0">newCharReader</a> () const JSONCPP_OVERRIDE</td></tr>
<tr class="memdesc:ab14c54e438007a57c1acbd6e7459d4d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocate a <a class="el" href="class_json_1_1_char_reader.html">CharReader</a> via operator new().  <a href="#ab14c54e438007a57c1acbd6e7459d4d0">More...</a><br /></td></tr>
<tr class="separator:ab14c54e438007a57c1acbd6e7459d4d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af890b5cb70e9b372e41de5c9e6535d21"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_json_1_1_char_reader_builder.html#af890b5cb70e9b372e41de5c9e6535d21">validate</a> (<a class="el" href="class_json_1_1_value.html">Json::Value</a> *invalid) const</td></tr>
<tr class="separator:af890b5cb70e9b372e41de5c9e6535d21"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1ee7bdbd6a7cd27c3c4b34a375204e21"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_json_1_1_value.html">Value</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_json_1_1_char_reader_builder.html#a1ee7bdbd6a7cd27c3c4b34a375204e21">operator[]</a> (JSONCPP_STRING key)</td></tr>
<tr class="separator:a1ee7bdbd6a7cd27c3c4b34a375204e21"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a0ddbea7a0af6da9feea922fbe4e5d6c6"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_json_1_1_char_reader_builder.html#a0ddbea7a0af6da9feea922fbe4e5d6c6">setDefaults</a> (<a class="el" href="class_json_1_1_value.html">Json::Value</a> *settings)</td></tr>
<tr class="separator:a0ddbea7a0af6da9feea922fbe4e5d6c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a62a6e55ae25c756994ee273f7d16044a"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_json_1_1_char_reader_builder.html#a62a6e55ae25c756994ee273f7d16044a">strictMode</a> (<a class="el" href="class_json_1_1_value.html">Json::Value</a> *settings)</td></tr>
<tr class="separator:a62a6e55ae25c756994ee273f7d16044a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:ac69b7911ad64c171c51ebaf2ea26d958"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_json_1_1_value.html">Json::Value</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_json_1_1_char_reader_builder.html#ac69b7911ad64c171c51ebaf2ea26d958">settings_</a></td></tr>
<tr class="separator:ac69b7911ad64c171c51ebaf2ea26d958"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Build a <a class="el" href="class_json_1_1_char_reader.html">CharReader</a> implementation. </p>
<p>Usage: </p><div class="fragment"><div class="line"><span class="keyword">using namespace </span><a class="code" href="namespace_json.html">Json</a>;</div><div class="line"><a class="code" href="class_json_1_1_char_reader_builder.html">CharReaderBuilder</a> builder;</div><div class="line">builder[<span class="stringliteral">&quot;collectComments&quot;</span>] = <span class="keyword">false</span>;</div><div class="line"><a class="code" href="class_json_1_1_value.html">Value</a> value;</div><div class="line">JSONCPP_STRING errs;</div><div class="line"><span class="keywordtype">bool</span> ok = <a class="code" href="namespace_json.html#aab0cf1ecf81d1aeca12be2a416a84352">parseFromStream</a>(builder, std::cin, &amp;value, &amp;errs);</div></div><!-- fragment --> </div><h2 class="groupheader">Member Function Documentation</h2>
<a id="ab14c54e438007a57c1acbd6e7459d4d0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab14c54e438007a57c1acbd6e7459d4d0">&#9670;&nbsp;</a></span>newCharReader()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_json_1_1_char_reader.html">CharReader</a>* Json::CharReaderBuilder::newCharReader </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Allocate a <a class="el" href="class_json_1_1_char_reader.html">CharReader</a> via operator new(). </p>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if something goes wrong (e.g. invalid settings) </td></tr>
  </table>
  </dd>
</dl>

<p>Implements <a class="el" href="class_json_1_1_char_reader_1_1_factory.html#a4c5862a1ffd432372dbe65cf59de98c4">Json::CharReader::Factory</a>.</p>

</div>
</div>
<a id="a1ee7bdbd6a7cd27c3c4b34a375204e21"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1ee7bdbd6a7cd27c3c4b34a375204e21">&#9670;&nbsp;</a></span>operator[]()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_json_1_1_value.html">Value</a>&amp; Json::CharReaderBuilder::operator[] </td>
          <td>(</td>
          <td class="paramtype">JSONCPP_STRING&#160;</td>
          <td class="paramname"><em>key</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>A simple way to update a specific setting. </p>

</div>
</div>
<a id="a0ddbea7a0af6da9feea922fbe4e5d6c6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0ddbea7a0af6da9feea922fbe4e5d6c6">&#9670;&nbsp;</a></span>setDefaults()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void Json::CharReaderBuilder::setDefaults </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_json_1_1_value.html">Json::Value</a> *&#160;</td>
          <td class="paramname"><em>settings</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Called by ctor, but you can use this to reset settings_. </p><dl class="section pre"><dt>Precondition</dt><dd>'settings' != NULL (but Json::null is fine) </dd></dl>
<dl class="section remark"><dt>Remarks</dt><dd>Defaults: <div class="fragment"></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="a62a6e55ae25c756994ee273f7d16044a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a62a6e55ae25c756994ee273f7d16044a">&#9670;&nbsp;</a></span>strictMode()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void Json::CharReaderBuilder::strictMode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_json_1_1_value.html">Json::Value</a> *&#160;</td>
          <td class="paramname"><em>settings</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Same as old <a class="el" href="class_json_1_1_features.html#aed3a2845df0cfd2ebe7338442361bd13" title="A configuration that is strictly compatible with the JSON specification. ">Features::strictMode()</a>. </p><dl class="section pre"><dt>Precondition</dt><dd>'settings' != NULL (but Json::null is fine) </dd></dl>
<dl class="section remark"><dt>Remarks</dt><dd>Defaults: <div class="fragment"></div><!-- fragment --></dd></dl>

</div>
</div>
<a id="af890b5cb70e9b372e41de5c9e6535d21"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af890b5cb70e9b372e41de5c9e6535d21">&#9670;&nbsp;</a></span>validate()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Json::CharReaderBuilder::validate </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_json_1_1_value.html">Json::Value</a> *&#160;</td>
          <td class="paramname"><em>invalid</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>true if 'settings' are legal and consistent; otherwise, indicate bad settings via 'invalid'. </dd></dl>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="ac69b7911ad64c171c51ebaf2ea26d958"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac69b7911ad64c171c51ebaf2ea26d958">&#9670;&nbsp;</a></span>settings_</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_json_1_1_value.html">Json::Value</a> Json::CharReaderBuilder::settings_</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Configuration of this builder. These are case-sensitive. Available settings (case-sensitive):</p><ul>
<li><code>"collectComments": false or true</code><ul>
<li>true to collect comment and allow writing them back during serialization, false to discard comments. This parameter is ignored if allowComments is false.</li>
</ul>
</li>
<li><code>"allowComments": false or true</code><ul>
<li>true if comments are allowed.</li>
</ul>
</li>
<li><code>"strictRoot": false or true</code><ul>
<li>true if root must be either an array or an object value</li>
</ul>
</li>
<li><code>"allowDroppedNullPlaceholders": false or true</code><ul>
<li>true if dropped null placeholders are allowed. (See <a class="el" href="class_json_1_1_stream_writer_builder.html" title="Build a StreamWriter implementation. ">StreamWriterBuilder</a>.)</li>
</ul>
</li>
<li><code>"allowNumericKeys": false or true</code><ul>
<li>true if numeric object keys are allowed.</li>
</ul>
</li>
<li><code>"allowSingleQuotes": false or true</code><ul>
<li>true if '' are allowed for strings (both keys and values)</li>
</ul>
</li>
<li><code>"stackLimit": integer</code><ul>
<li>Exceeding stackLimit (recursive depth of <code>readValue()</code>) will cause an exception.</li>
<li>This is a security issue (seg-faults caused by deeply nested JSON), so the default is low.</li>
</ul>
</li>
<li><code>"failIfExtra": false or true</code><ul>
<li>If true, <code>parse()</code> returns false when extra non-whitespace trails the JSON value in the input string.</li>
</ul>
</li>
<li><code>"rejectDupKeys": false or true</code><ul>
<li>If true, <code>parse()</code> returns false when a key is duplicated within an object.</li>
</ul>
</li>
<li><code>"allowSpecialFloats": false or true</code><ul>
<li>If true, special float values (NaNs and infinities) are allowed and their values are lossfree restorable.</li>
</ul>
</li>
</ul>
<p>You can examine 'settings_` yourself to see the defaults. You can also write and read them just like any JSON <a class="el" href="class_json_1_1_value.html" title="Represents a JSON value. ">Value</a>. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="class_json_1_1_char_reader_builder.html#a0ddbea7a0af6da9feea922fbe4e5d6c6">setDefaults()</a> </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>oxygine/src/oxygine/json/<a class="el" href="json_8h_source.html">json.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Mar 4 2018 03:50:05 for Oxygine by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>
